build:
	docker image pull harbor.nas.local/proxy-docker/nvidia/cuda:11.8.0-devel-ubuntu22.04
	docker image tag harbor.nas.local/proxy-docker/nvidia/cuda:11.8.0-devel-ubuntu22.04 nvidia/cuda:11.8.0-devel-ubuntu22.04
	docker image rm harbor.nas.local/proxy-docker/nvidia/cuda:11.8.0-devel-ubuntu22.04
	docker image pull harbor.nas.local/proxy-docker/nvidia/cuda:11.8.0-runtime-ubuntu22.04
	docker image tag harbor.nas.local/proxy-docker/nvidia/cuda:11.8.0-runtime-ubuntu22.04 nvidia/cuda:11.8.0-runtime-ubuntu22.04
	docker image rm harbor.nas.local/proxy-docker/nvidia/cuda:11.8.0-runtime-ubuntu22.04
	docker image build --add-host devpi.nas.local:192.168.31.6 --add-host gitcache.nas.local:192.168.31.6 --add-host nexus.nas.local:192.168.31.6 -t tg-oobabooga:1.7 -f ./services/oobabooga/Dockerfile ./services/oobabooga
push:
	docker image tag tg-oobabooga:1.7 harbor.nas.local/jinnyang/text-generation-webui:1.7.0
	docker push harbor.nas.local/jinnyang/text-generation-webui:1.7.0
	docker image rm harbor.nas.local/jinnyang/text-generation-webui:1.7.0
start: 
	docker compose --profile oobabooga up -d

stop: 
	docker compose --profile oobabooga down
	docker compose --profile oobabooga rm -s